import java.util.ArrayList;
import java.util.List;

public class University extends OrganizationComponent{
    private List<OrganizationComponent> orgs = new ArrayList<>();

    public University(String name, String desr) {
        super(name, desr);
    }

    @Override
    protected void add(OrganizationComponent organizationComponent) {
        orgs.add(organizationComponent);
    }

    @Override
    protected void remove(OrganizationComponent organizationComponent) {
        orgs.remove(organizationComponent);
    }

    @Override
    protected void print() {
        System.out.println("-------------"+getName()+"-------------");
        for (OrganizationComponent org : orgs) {
            org.print();
        }
    }
}
